package com.hu.bgp.framework;

import java.util.ArrayList;

import com.hu.bgp.server.Player;

import de.novanic.eventservice.client.event.domain.Domain;

/**
 * De context voor een lopend spelletje.
 * 
 * @author ejvos
 */
public class GameContext
{
	private Domain gameDomain;
	private Player initialPlayer;
	private GameState state;
	private ArrayList<Player> players = new ArrayList<Player>();

	public GameContext(Domain gameDomain, Player initialPlayer)
	{
		super();
		this.gameDomain = gameDomain;
		this.initialPlayer = initialPlayer;
		state = GameState.INITIALIZING;
	}

	public Domain getGameDomain()
	{
		return gameDomain;
	}

	public Player getInitialPlayer()
	{
		return initialPlayer;
	}

	public GameState getState()
	{
		return state;
	}

	public void changeState(GameState newState)
	{
		// TODO also move instance in gameinstancecollection?
		state = newState;
	}

	public ArrayList<Player> getPlayers()
	{
		return players;
	}
}
